namespace Services.Activity.Domain.Entities;
public record ActivityVolunteer
{
    public long Id { get; private set; }
    public long ActivityId { get; private set; }
    public long VolunteerId { get; private set; }
    public DateTime JoinTime { get; private set; }
    public DateTime DepartTime { get; private set; }
    public bool IsDeparted { get; private set; } = false;
    public bool IsSignedIn { get; private set; } = false;
    public DateTime SignInTime { get; private set; }
    public void Depart()
    {
        this.DepartTime = DateTime.Now;
        this.IsDeparted = true;
    }
    public void SignIn()
    {
        this.IsSignedIn = true;
        this.SignInTime = DateTime.Now;
    }
    private ActivityVolunteer() { }
    public static ActivityVolunteer Create(long activityId, long volunteerId)
    {
        var activityVolunteer = new ActivityVolunteer
        {
            ActivityId = activityId,
            VolunteerId = volunteerId,
            JoinTime = DateTime.Now
        };
        return activityVolunteer;
    }
}